<?php 

	/*
	* file: modify.php
	*
	* contents:	dummy page to rapidly access to all documents.
	*
	* author: Lisa Pedrazzi, Zanco Federico
	*/

	include("init.php");

	/* Parameters for the pages*/
    
	//Header
	$pageTitle = "Modifica dei documenti esistenti";
	$pageDescription = "Pagina di inserimento di modifica dei documenti esistenti";
    
	//Content
	$title = "Modifica dei documenti esistenti";
    
	$query = "SELECT `doc_num`, `date`, `from`, `to`, `type`, `description` FROM documents ";
	if ($_SESSION['department'] != "Amministrazione")
		$query = $query . " WHERE department=\"" . $_SESSION['department'] . "\"";
	$query = $query . "ORDER BY `date` DESC LIMIT 0,50";
			
	$text = showResult(query($query, $con), false);

	showHeader($pageTitle, $pageDescription);
	showMenu();
	showContents($title, $errors, $text);
	showFooter($lastRev);
    
?>